export default {
  data(){
    return {
      store: {},
      BusinessDaily: {},//经营日报
    }
  },
  created(){
    this.store = uni.getStorageSync('userInfoDetail').store
    this.role = this.$store.state.user.userInfo.role
    this.getDateOfReport()
  },
  methods: {
    returnTime(time) {
		  if (time) {
		    return time.split('T')[0]
		  }
    },
    goPage(url){
      uni.navigateTo({
        url: url
      })
    },
    async getDateOfReport(){
      let storeId = uni.getStorageSync('userInfoDetail').store.storeId
      try{
        let data = {
          'store_Id': storeId
        }
        const res = await this.$api.banner.getDateOfReport(data)
        this.BusinessDaily = res.data
      }catch(e){
        //TODO handle the exception
      }
    },
    goMargin() {
		  console.log(1111)
		  uni.navigateTo({
		    url: '/pages_common/pages_me/margin/margin',
		  })
    },
  },
}